public class test {
    public static void test1(Animal animal) {
        animal.eat();
    }

    public static void test2(IRuning iRuning) {
        iRuning.run();
    }

    public static void test3(ISwiming iSwiming) {
        iSwiming.swim();
    }

    public static void test4(IFlying iFlying) {
        iFlying.fly();
    }

    public static void main(String[] args) {
        Bird bird = new Bird("小鸟", 1);
        Dog dog = new Dog("小狗", 12);
        test2(bird);
        test2(dog);
        System.out.println("===========");
        //test3Bird
        test3(dog);
        System.out.println("===========");
        test4(bird);
        System.out.println("===========");

        test2(new Robot());

    }
}


